projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f6c23b
)
(doprnt): Do the right thing for negative size spec.
author
Karl Heuer
<kwzh@gnu.org>
Mon, 7 Mar 1994 18:59:00 +0000
(18:59 +0000)
committer
Karl Heuer
<kwzh@gnu.org>
Mon, 7 Mar 1994 18:59:00 +0000
(18:59 +0000)
src/doprnt.c
patch
|
blob
|
history
diff --git
a/src/doprnt.c
b/src/doprnt.c
index 7abe5fa3a6b004aab3687999777b40f8b506dad2..303846124f4c6cbd1cd1f6bddb0d0dd4b65cbaae 100644
(file)
--- a/
src/doprnt.c
+++ b/
src/doprnt.c
@@
-94,11
+94,12
@@
doprnt (buffer, bufsize, format, format_end, nargs, args)
}
*string = 0;
/* Get an idea of how much space we might need. */
- size_bound = atoi (&fmtcpy[1])
+ 50
;
+ size_bound = atoi (&fmtcpy[1]);
/* Avoid pitfall of negative "size" parameter ("%-200d"). */
if (size_bound < 0)
size_bound = -size_bound;
+ size_bound += 50;
/* Make sure we have that much. */
if (size_bound > size_allocated)